<template>
  <div id="markdown">
    <div class="header">
      <div class="header_left">
        <div style="position: relative">
          <div
            style="
              width: 53px;
              height: 28px;
              background-color: rgb(183, 75, 97);
              float: right;
              position: relative;
            "
          >
            <div class="left-triangle">
              <div
                style="
                  width: 10px;
                  height: 10px;
                  background: #fff;
                  margin: 5px;
                  transform: rotate(90deg);
                "
              ></div>
            </div>
          </div>
          <div
            style="
              position: absolute;
              top: 9px;
              left: 27px;
              width: 48px;
              height: 1px;
              background: rgb(183, 75, 97);
            "
          ></div>
          <div
            style="
              position: absolute;
              top: 21px;
              left: 0;
              width: 75px;
              height: 1px;
              background: rgb(183, 75, 97);
            "
          ></div>
        </div>
      </div>
      <div
        style="color: rgb(255, 255, 255); background-color: rgb(183, 75, 97)"
      >
        <span style="font-weight: 600; line-height: 28px; text-align: center">
          外来人员登记表
        </span>
      </div>
      <div class="header_right">
        <div style="position: relative">
          <div
            style="
              width: 53px;
              height: 28px;
              background-color: rgb(183, 75, 97);
              float: left;
              position: relative;
            "
          >
            <div class="right-triangle">
              <div
                style="
                  width: 10px;
                  height: 10px;
                  background: #fff;
                  margin: 5px;
                  transform: rotate(90deg);
                "
              ></div>
            </div>
          </div>
          <div
            style="
              position: absolute;
              top: 9px;
              right: 27px;
              width: 48px;
              height: 1px;
              background: rgb(183, 75, 97);
            "
          ></div>
          <div
            style="
              position: absolute;
              right: 0;
              top: 22px;
              width: 75px;
              height: 1px;
              background: rgb(183, 75, 97);
            "
          ></div>
        </div>
      </div>
    </div>
    <div class="fx-field">
      <div style="font-weight: 600; line-height: 20px">个人信息</div>
      <div style="position: relative; height: 8px">
        <div class="sep-label"></div>
        <div class="sep-bg-wrapper"></div>
      </div>
    </div>
    <div style="padding: 7px 12px 12px; display: flex; flex-wrap: wrap">
      <div style="width: 50%">
        <el-form
          :label-position="labelPosition"
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          class="demo-ruleForm"
        >
          <el-form-item label="姓名" prop="name">
            <span
              style="display: block; line-height: 10px; color: rgb(217, 83, 79)"
            >
              请输入本人真实姓名
            </span>
            <el-input
              size="small"
              style="width: 350px; height: 35px"
              v-model="ruleForm.name"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div style="width: 50%">
        <el-form
          :label-position="labelPosition"
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          class="demo-ruleForm"
        >
          <el-form-item label="身份证号码" prop="identity">
            <span
              style="display: block; line-height: 10px; color: rgb(217, 83, 79)"
            >
              请准确输入18位身份证号码
            </span>
            <el-input
              size="small"
              style="width: 350px; height: 35px"
              v-model="ruleForm.identity"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div style="width: 50%">
        <el-form
          :label-position="labelPosition"
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          class="demo-ruleForm"
        >
          <el-form-item label="年龄" prop="age">
            <el-input
              size="small"
              style="width: 350px; height: 35px"
              v-model="ruleForm.age"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div style="width: 50%">
        <el-form
          :label-position="labelPosition"
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          class="demo-ruleForm"
        >
          <el-form-item label="手机号" prop="phone">
            <span
              style="display: block; line-height: 10px; color: rgb(217, 83, 79)"
            >
              请准确输入18位身份证号码
            </span>
            <el-input
              size="small"
              style="width: 350px; height: 35px"
              v-model="ruleForm.phone"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div style="width: 50%">
        <el-form
          :label-position="labelPosition"
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          class="demo-ruleForm"
        >
          <el-form-item label="常驻街道" prop="phone">
            <el-select size="small" style="width: 350px;" v-model="value" filterable placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <h1>街道新冠疫苗接种人员登记表</h1>
    <!-- <p v-permission="'adminBtn'">adminBtn</p>
    <p v-permission="'editorBtn'">editorBtn</p> -->
  </div>
</template>

<script>
// import {Editor, Viewer} from ''

export default {
  name: 'admin',
  // components: {Editor, Viewer},
  data() {
    return {
      content: '123',
      labelPosition: 'top',
      ruleForm: {
        name: '',
        identity: '',
        age: '',
        phone: '',
      },
      options: [
        {
          value: 'A街道',
          label: 'A街道',
        },
        {
          value: 'B街道',
          label: 'B街道',
        },
        {
          value: 'C街道',
          label: 'C街道',
        },
      ],
      rules: {
        name: [
          { required: true, message: '此项为必填项', trigger: 'blur' },
          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
        ],
        identity: [
          { required: true, message: '此项为必填项', trigger: 'blur' },
          {
            min: 14,
            max: 18,
            message: '长度在 1 到 18 个字符',
            trigger: 'blur',
          },
        ],
        age: [
          { required: true, message: '此项为必填项', trigger: 'blur' },
          { min: 1, max: 3, message: '年龄输入错误', trigger: 'blur' },
        ],
        phone: [
          { required: true, message: '此项为必填项', trigger: 'blur' },
          { min: 1, max: 11, message: '输入正确手机号', trigger: 'blur' },
        ],
      },
    };
  },
  methods: {},
};
</script>

<style scoped>
#markdown {
  padding: 10px;
  /*height: 500px;*/
}
.el-form-item {
  margin: 0 !important;
}
.el-form-item__content {
  height: 60px !important;
}
button {
  padding: 10px;
  margin: 10px;
}
.header {
  width: 100%;
  height: 28px;
  display: flex;
  justify-content: center;
  line-height: 28px;
  margin: 12px;
}
.header_left {
  width: 150px;
}
.header_right {
  width: 150px;
}
.left-triangle {
  position: absolute;
  top: 4px;
  right: 44px;
  width: 20px;
  height: 21px;
  background-color: rgb(183, 75, 97);
  transform: rotate(-45deg);
}
.right-triangle {
  position: absolute;
  top: 4px;
  right: -10px;
  width: 20px;
  height: 21px;
  background-color: rgb(183, 75, 97);
  transform: rotate(-45deg);
}
.fx-field {
  padding: 7px 12px 12px;
  line-height: 20px;
}
.sep-label {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  min-width: 8%;
  max-width: 81%;
  background: rgb(183, 75, 97);
  border-radius: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sep-bg-wrapper {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 50%;
  margin-left: 8px;
  background: rgb(183, 75, 97);
  opacity: 0.2;
}
.el-form--label-top .el-form-item__label {
  padding: 0 0 0 0 !important;
  line-height: 0px !important;
}
</style>
